package com.chenu.gamscriptman.config;

import com.chenu.gamscriptman.compoent.ChenuMD5PasswordEncoder;
import com.google.gson.Gson;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author flyan
 * date 2019-12-24
 * @function Spring仓库配置类，存放所有自定义的一些对象，它替代了Spring的配置文件
 */
@Configuration
public class SpringConfig {
    private ChenuMD5PasswordEncoder chenuMD5PasswordEncoder = new ChenuMD5PasswordEncoder();

    /* 单例模式：MD5加密工具 */
    @Bean
    public ChenuMD5PasswordEncoder chenuMD5PasswordEncoder(){
        return chenuMD5PasswordEncoder;
    }

}
